import request from '@/utils/request'

// 查询流程节点列表
export function listFlowNode(query) {
  return request({
    url: '/labdata/flowNode/list',
    method: 'get',
    params: query
  })
}

///listFlowNodes/{workflowId}
export function listNodes(workflowId) {
  return request({
    url: '/labdata/flowNode/listFlowNodes/'+workflowId,
    method: 'get'
  })
}
//saveSort
export function saveSort(data) {
  return request({
    url: '/labdata/flowNode/saveSort',
    method: 'put',
    data: data
  })
}

// 查询流程节点详细
export function getFlowNode(nodeId) {
  return request({
    url: '/labdata/flowNode/' + nodeId,
    method: 'get'
  })
}

// 新增流程节点
export function addFlowNode(data) {
  return request({
    url: '/labdata/flowNode',
    method: 'post',
    data: data
  })
}

// 修改流程节点
export function updateFlowNode(data) {
  return request({
    url: '/labdata/flowNode',
    method: 'put',
    data: data
  })
}

// 删除流程节点
export function delFlowNode(nodeId) {
  return request({
    url: '/labdata/flowNode/' + nodeId,
    method: 'delete'
  })
}

// 导出流程节点
export function exportFlowNode(query) {
  return request({
    url: '/labdata/flowNode/export',
    method: 'get',
    params: query
  })
}
